package cn.ad.model;

import cn.ad.enumration.AdFormat;
import cn.ad.enumration.AdSpaceStatus;
import cn.ad.enumration.OsType;
import org.apache.ibatis.type.Alias;

@Alias("adSpaceModel")
public class AdSpaceModel {
	/**
	 * 广告位ID
	 */
	private int id;
	/**
	 * 广告位名称
	 */
	private String name;
	/**
	 * 广告形式ID
	 */
	private int formatId;
	/**
	 * 广告形式名称
	 */
	private String formatName;

	/**
	 * 广告位状态标识
	 */
	private int status;

	/**
	 * 广告位状态标识名称
	 */
	private String statusName;
	/**
	 * 比例值
	 */
	private String ratioValue;

	/**
	 * 媒体名称
	 */
	private String pubSiteName;

	/**
	 * 网站提供商名称
	 */
	private String supplierName;
	/**
	 * 操作系统0：未知 1：android 2：ios 3：windows

	 */
	private int os;
	/**
	 * 操作系统名称
	 */
	private String osName;
	
	/**
	 * 示例图地址
	 */
	private String sampleUrl;

	/**
	 * 模板ID
	 */
	private int templateId;
	
	/**
	 * 模板名称
	 */
	private String templateName;
	/**
	 * 交互方式枚举类型有 1 跳转 2 APP下载 3 跳转或者app下载
	 */
	private int interactions;

	private String interactionsName;
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getFormatId() {
		return formatId;
	}

	public void setFormatId(int formatId) {
		this.formatId = formatId;
	}

	public String getFormatName() {
		return AdFormat.forValue(formatId);
	}

	public void setFormatName(String formatName) {
		this.formatName = formatName;
	}

	public String getRatioValue() {
		return ratioValue;
	}

	public void setRatioValue(String ratioValue) {
		this.ratioValue = ratioValue;
	}

	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	public Integer getOs() {
		return os;
	}

	public void setOs(Integer os) {
		this.os = os;
	}

	public String getOsName() {
		return OsType.forValue(os);
	}

	public void setOsName(String osName) {
		this.osName = osName;
	}

	public String getSampleUrl() {
		return sampleUrl;
	}

	public void setSampleUrl(String sampleUrl) {
		this.sampleUrl = sampleUrl;
	}

	public String getTemplateName() {
		return templateName;
	}

	public void setTemplateName(String templateName) {
		this.templateName = templateName;
	}

	public void setOs(int os) {
		this.os = os;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getStatusName() {
		return AdSpaceStatus.forValue(status);
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public int getTemplateId() {
		return templateId;
	}

	public void setTemplateId(int templateId) {
		this.templateId = templateId;
	}

	public String getPubSiteName() {
		return pubSiteName;
	}

	public void setPubSiteName(String pubSiteName) {
		this.pubSiteName = pubSiteName;
	}

	public int getInteractions() {
		return interactions;
	}

	public void setInteractions(int interactions) {
		this.interactions = interactions;
	}

	public String getInteractionsName() {
		return interactionsName;
	}

	public void setInteractionsName(String interactionsName) {
		this.interactionsName = interactionsName;
	}

	@Override
	public String toString() {
		return "AdSpaceModel{" +
				"id=" + id +
				", name='" + name + '\'' +
				", formatId=" + formatId +
				", formatName='" + getFormatName() + '\'' +
				", status=" + status +
				", statusName='" + getStatusName() + '\'' +
				", ratioValue='" + ratioValue + '\'' +
				", pubSiteName='" + pubSiteName + '\'' +
				", supplierName='" + supplierName + '\'' +
				", os=" + os +
				", osName='" + getOsName() + '\'' +
				", sampleUrl='" + sampleUrl + '\'' +
				", templateId=" + templateId +
				", templateName='" + templateName + '\'' +
				'}';
	}
}
